# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=perl-control-x10
_pkgreal=ControlX10-CM11
pkgver=2.09
pkgrel=5
pkgdesc="Perl extension for X10 'ActiveHome' Controller"
url="https://metacpan.org/release/ControlX10-CM11"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/B/BB/BBIRTH/ControlX10-CM11-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	# creates file collision among perl modules
	find "$pkgdir" -name perllocal.pod -delete
}

sha512sums="c13f275c6673a0a6b6b3eafa353e7d9c36a651359247abdf5308870ccbf5528b7d57fed57ce8dea2f9801ce1725835f16f1091705a3c4bd9c571e4690de5e450  ControlX10-CM11-2.09.tar.gz"
